function e(e, t) {
    this.circle = e, this.screen = t, this.speed = 0, this.maxSpeed = 10, this.friction = .98, 
    this.acceleration = .5, this.isRun = !1, this.rounds = 5, this.degrees = 0, this.angle = -90, 
    this.speedDown = !1, this.speedUp = !0, this.anticlockwise = !1, this.onComplete = null, 
    this.isDebug = !1;
}

var t = require("80E989072FB173BFE68FE100F6E4DCA6.js");

e.prototype.run = function() {
    this.speedDown = !1, this.speedUp = !0, this.isRun = !0, this.speed = 0, this.prize = null;
}, e.prototype.draw = function(e) {
    e.save(), this.isDebug && (e.translate(10, 15), e.setFontSize(12), e.setFillStyle("black"), 
    e.fillText("angle: " + Math.round(this.angle), 0, 0), e.translate(0, 15), e.fillText("speed: " + this.speed, 0, 0), 
    this.prize && (e.translate(0, 15), e.fillText("minAngle: " + this.minAngle, 0, 0), 
    e.translate(0, 15), e.fillText("maxAngle: " + this.maxAngle, 0, 0), e.translate(0, 15), 
    e.fillText("prize.text: " + this.prize.text, 0, 0)));
    var t = this.screen.w - 20;
    e.drawImage("assets/logo.png", 10, 10, t, 70), e.restore();
}, e.prototype.update = function() {
    if (this.isRun) {
        var e = this.prize && this.angle > this.minAngle && this.angle < this.maxAngle;
        e && (this.speedDown = !0), this.speed >= this.maxSpeed && (this.speedUp = !1), 
        this.speedUp && (this.speed += this.acceleration), this.speedDown && (this.speed <= 2 && e ? (this.isRun = !1, 
        this.speed = 0, this.onComplete && this.onComplete(this.prize)) : this.speed <= 1 ? this.speed = 1 : this.speed *= this.friction), 
        this.angle += this.speed, Math.abs(this.angle) > 360 && (this.angle -= 360), console.log("anticlockwise:", this.anticlockwise), 
        this.anticlockwise ? this.circle.rotation += Math.PI / 180 * this.speed : this.circle.rotation -= Math.PI / 180 * this.speed;
    }
}, e.prototype.stopTo = function(e) {
    var s = this.circle, i = s.angle, h = t.getRandom(i / 2);
    this.minAngle = e * i + h, this.maxAngle = e * i + i, this.prize = s.slicePrizes[e];
}, module.exports = e;